USE [HR_DB]
GO
if exists(select * from dbo.sysobjects where id = object_id(N'config_major')   and   OBJECTPROPERTY(id,   N'IsUserTable')   =   1)   
  drop table config_major  
-- =============================================
-- Author:杨洁(kaixuanpisces)
-- Create date: 20090806
-- Description:职位设置表
-- =============================================
CREATE TABLE [dbo].[config_major](
	[mak_id] [smallint] IDENTITY(1,1) NOT NULL,
	[major_kind_id] [char](2) NULL,
	[major_kind_name] [varchar](60) NULL,
	[major_id] [char](2) NULL,
	[major_name] [varchar](60) NULL,
	[test_amount] [smallint] NULL,
 CONSTRAINT [config_major_PK] PRIMARY KEY CLUSTERED 
(
	[mak_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
-- ==============================================
-- 列名说明
-- ==============================================
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键，自动增长列' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'config_major', @level2type=N'COLUMN',@level2name=N'mak_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职位分类编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'config_major', @level2type=N'COLUMN',@level2name=N'major_kind_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职位分类名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'config_major', @level2type=N'COLUMN',@level2name=N'major_kind_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职位编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'config_major', @level2type=N'COLUMN',@level2name=N'major_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职位名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'config_major', @level2type=N'COLUMN',@level2name=N'major_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'题套数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'config_major', @level2type=N'COLUMN',@level2name=N'test_amount'
-- ===============================================
-- 测试数据
-- ===============================================
insert into config_major values('01','销售','01','区域经理',0)
insert into config_major values('01','销售','02','总经理',0)
insert into config_major values('02','软件开发','01','项目经理',0)
insert into config_major values('02','软件开发','02','程序员',0)
insert into config_major values('03','人力资源','01','人事经理',0)
insert into config_major values('03','人力资源','02','专员',0)
insert into config_major values('04','生产部','01','主任',0)
insert into config_major values('04','生产部','02','技术工人',0)